﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace OopMethod
{
    internal class Student
    {
        public int Id { get; set; }
        public string Name { get; set; }

        private string _hobby;

        public string Hobby
        {
            get
            {
                return this._hobby;
            }
            set
            {
                this._hobby = value;
            }
        }


        public Student() { }

        public Student(int id, string name, string hobby) { 
            
            this.Id= id;
            this.Name = name;
            this.Hobby = hobby;
        }


        public void Method1()
        {
            this.Method2();
        }

        public void Method2()
        {
            Console.WriteLine($"{this.Id},{this.Name},{this.Hobby}");

        }
    }
}
